package com.sniper.constants;

import java.util.*;

/**
 * 基本数据保存
 *
 * @author suzhen
 */
public class DataValues {


    /**
     * java基本包装类型
     *
     * @return
     */
    public static Map<Class, Boolean> dataType() {
        Map<Class, Boolean> dataType = new HashMap<>(8);
        dataType.put(Date.class, true);
        dataType.put(Integer.class, true);
        dataType.put(Short.class, true);
        dataType.put(Long.class, true);
        dataType.put(Float.class, true);
        dataType.put(Double.class, true);
        dataType.put(Boolean.class, true);
        dataType.put(Character.class, true);
        dataType.put(String.class, true);
        return dataType;
    }


    public static Map<String, String> mapWeek() {
        Map<String, String> weeks = new HashMap<>(7);
        weeks.put("1", "周一");
        weeks.put("2", "周二");
        weeks.put("3", "周三");
        weeks.put("4", "周四");
        weeks.put("5", "周五");
        weeks.put("6", "周六");
        weeks.put("7", "周日");
        return weeks;
    }

    /**
     * 工商企业类型
     *
     * @return
     */
    public static Map<String, String> mapGongShangType() {
        Map<String, String> weeks = new HashMap<>(4);
        weeks.put("1", "营业");
        weeks.put("2", "吊销");
        weeks.put("3", "注销");
        weeks.put("4", "迁出");
        return weeks;
    }


    /**
     * 定义基本数据类型
     */
    public static Map<String, String> mapYesNoInt() {
        Map<String, String> yesNoInt = new HashMap<>(2);
        yesNoInt.put("0", "否");
        yesNoInt.put("1", "是");
        return yesNoInt;
    }

    public static Map<String, String> mapYesNoBoolean() {
        Map<String, String> yesNoInt = new HashMap<>(2);
        yesNoInt.put("false", "否");
        yesNoInt.put("true", "是");
        return yesNoInt;
    }

    public static List<String> listTargets() {
        List<String> targets = new ArrayList<>(2);
        targets.add("_self");
        targets.add("_blank");
        return targets;
    }

    public static Map<String, String> mapRightType() {
        Map<String, String> yesNoInt = new HashMap<>(1);
        yesNoInt.put("admin", "后台");
        return yesNoInt;
    }
}
